package com.ttbj.api.truck;

import java.util.List;

import com.ttbj.api.dto.Page;
import com.ttbj.api.dto.truck.TruckCustomDto;
import com.ttbj.api.dto.truck.TruckDto;
import com.ttbj.api.exception.BusinessException;

public interface TruckService {
	
	/**
	 * 通过truckId查询部分货车的部分信息，用于在预订单中显示
	 * @param truckId 货车主键id
	 * @return
	 * @throws BusinessException
	 */
	public TruckCustomDto findTruckInfoById(Long truckId) throws BusinessException;
	
	/**
	 * 分页条件查询货车信息
	 * @param truckCustomDto 货车查询条件信息
	 * @param page 分页信息
	 * @return List
	 * @throws BusinessException
	 */
	public List<TruckCustomDto> findTruckInfoByPage(TruckCustomDto truckCustomDto, Page page) throws BusinessException;
	
	/**
	 * 分页条件查询货车信息数量
	 * @param truckCustomDto 货车查询条件信息
	 * @return 总数量
	 * @throws BusinessException
	 */
	public Integer findTruckInfoByPageCount(TruckCustomDto truckCustomDto) throws BusinessException;
	
	/**
	 * 添加货车信息
	 * @param truckDto 货车信息
	 * @throws BusinessException
	 */
	public void addTruckInfo(TruckDto truckDto) throws BusinessException;
	
	/**
	 * 通过id查询货车部分信息，用于编辑显示信息
	 * @param truckId 货车id
	 * @return 货车对象信息
	 * @throws BusinessException
	 */
	public TruckDto findTruckInfoUsedEdit(Long truckId) throws BusinessException;
	
	/**
	 * 通过id更新货车信息
	 * @param truckDto 货车信息
	 * @throws BusinessException
	 */
	public void editTruckInfo(TruckDto truckDto) throws BusinessException;
	
	/**
	 * 通过id更改货车禁用状态
	 * @param isDel 是否禁用：1未禁用，0禁用
	 * @param truckId 货车id
	 * @throws BusinessException
	 */
	public void editTruckDisable(Integer isDel, Long truckId) throws BusinessException;
	
	/**
	 * 通过货车id查询车牌号和entity，用于百度地图显示
	 * @param truckIds 货车主键id数组
	 * @return
	 * @throws BusinessException
	 */
	public List<TruckCustomDto> findTruckCarnumAndEntity(Long[] truckIds) throws BusinessException;
}
